/**********************************************************************************************************************
 *
 * Project:    mGameEngine
 * File:       microphone.h
 * Author:     karooolek
 * Created on: 2009-03-24
 *
 **********************************************************************************************************************/

#ifndef MICROPHONE_H_
#define MICROPHONE_H_

#include "../common.h"
#include <AL/al.h>

namespace mGameEngine
{
namespace Audio
{

/**
 * Microphone.
 * Microphone listens to sounds on scene.
 */
class Microphone
{
protected:
    /**
     * Gain (master volume).
     */
    float _gain;

public:
    /**
     * Create microphone.
     */
    Microphone();

    /**
     * Create microphone with specified gain.
     * @param gain gain.
     */
    Microphone(float gain);

    /**
     * Destroy microphone.
     */
    virtual ~Microphone();

    /**
     * Get gain.
     * @return gain.
     */
    float getGain() const
    {
        return _gain;
    }

    /**
     * Set gain.
     * @param gain gain.
     */
    void setGain(float gain)
    {
        _gain = gain;
    }

    /**
     * Use microphone as active.
     */
    virtual void use() const;
};

}
}

#endif // MICROPHONE_H_
